package cn.javastudy.design._2_结构型模式._装饰器模式.装饰类;

import cn.javastudy.design._2_结构型模式._装饰器模式.被装饰的类.FastFood;

/**
 * 培根类
 *
 * @author sumou
 * @date 2025/01/24
 */
public class Bacon extends Garnish {

    public Bacon(FastFood food) {
        super(food, 1.5, "培根" + food.getDesc());
    }

    @Override
    public Double count() {
        return getPrice() + getFood().getPrice();
    }

}
